﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<AdminBaseViewData>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>管理平台</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css" href="/Content/Widget/jquery-easyui/themes/default/easyui.css" />
    <link href="/Content/Widget/jquery-easyui/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="/Content/Skin/Admin/common-admin.css" rel="stylesheet" type="text/css" />
    <script src="/Content/Widget/jquery-easyui/jquery-1.7.2.min.js" type="text/javascript"></script>
   
    <script type="text/javascript" src="/Content/Widget/jquery-easyui/jquery.easyui.min.js"></script>
    <script src="/Content/Widget/jquery-easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
    <script src="/Content/Scripts/common-admin.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            var p = $('body').layout('panel', 'west').panel({
                onCollapse: function () {
                }
            });
            var tabsMenu = $('.tabs-menu-a').click(function () {
                // $(".tabs-menu.seleced").removeClass("seleced");
                //$(this).addClass("seleced");
                addTab($(this).html(), $(this).attr('title'), $(this).attr('url'));
            });
            var leftMenu = $('#leftMenu').accordion({ animate: false, fit: true });

            $('#loginOut').click(function () {
                $.messager.confirm('系统提示', '您确定要退出本次登录吗?', function (r) {
                    if (r) {
                        $.ajax({
                            url: '<%=Url.Action("LoginOut","Login") %>',
                            type: 'Post',
                            dataType: 'json',
                            timeout: 1000,
                            success: function (data) {
                                if (data.state)
                                    location.href = '<%=Url.Action("Index","Login") %>';
                                else {
                                    msgShow("登出提示", data.message, data.state ? "info" : "error", function () {
                                        if (data.state)
                                            location.href = '<%=Url.Action("Index","Login") %>';
                                    });
                                }

                            }
                        });
                    }
                });
            });
        });
        function addTab(tabsId, title, url, refresh) {
            var content = '<iframe scrolling="auto" frameborder="0" refreshurl=' + url + '  src="' + url + '" style="width:100%;height:100%;padding: 0px;margin: 0px;"></iframe>';
            if ($('#main_tabs').tabs('exists', title)) {
                $('#main_tabs').tabs('select', title);
                if (refresh != undefined && refresh) {
                    var tab = $('#main_tabs').tabs('getSelected');
                    $('#main_tabs').tabs('update', {
                        tab: tab,
                        options: {
                            title: title,
                            content: content,
                            closable: true
                        }
                    });
                }
            } else {
                $('#main_tabs').tabs('add', {
                    title: title,
                    content: content,
                    closable: true,
                    tools: [{
                        iconCls: 'icon-mini-refresh',
                        handler: function () {
                            refreshTab({ tabTitle: title, url: url });
                        }
                    }]
                });
            }
        }
        function refreshTab(cfg) {
            var refreshtab = cfg.tabTitle ? $('#main_tabs').tabs('getTab', cfg.tabTitle) : $('#main_tabs').tabs('getSelected');
            if (refreshtab && refreshtab.find('iframe').length > 0) {
                var refreshIfram = refreshtab.find('iframe')[0];
                var refreshUrl = $(refreshIfram).attr('refreshurl') ? $(refreshIfram).attr('refreshurl') : cfg.url;
                refreshIfram.contentWindow.location.href = refreshUrl;
            }
        }
    </script>
</head>
<body class="easyui-layout">
    <div region="north" border="false" style="height: 74px; background: url(/Content/Skin/Admin/zh-cn/main/images/index1_03.gif);">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td width="33%" rowspan="2">
                </td>
                <td width="6%" rowspan="2">
                    &nbsp;
                </td>
                <td width="61%" height="38" align="right">
                    <table width="120" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="center">
                                <img src="/Content/Skin/Admin/zh-cn/main/images/index1_06.gif" width="16" height="16"
                                    alt="" />
                            </td>
                            <td align="center" class="font2">
                                <a href="#" class="font2"><strong>帮助</strong></a>
                            </td>
                            <td align="center">
                                <img src="/Content/Skin/Admin/zh-cn/main/images/index1_08.gif" width="16" height="16"
                                    alt="" />
                            </td>
                            <td align="center" class="font2">
                                <a href="#" id="loginOut" class="font2"><strong>退出</strong></a>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td align="right" class="font2">
                                <%--  <a href="<%=Url.Action("Index","Main",new{culture="gib"}) %>">繁体 </a>&nbsp;|&nbsp;--%>
                   <%--             <a href="<%=Url.Action("Index","Main",new{culture="en-us"}) %>">English </a>&nbsp;|&nbsp;
                                <a href="<%=Url.Action("Index","Main",new{culture="zh-cn"}) %>">中文</a>&nbsp;|&nbsp;
                                当前语言:<%=Model.Culture %>
                                &nbsp;|&nbsp;--%>
                                <%--   <a href="#">
                                  <img src="/Content/Admin/zh-cn/main/images/index1_13.gif" width="84" height="24"
                                        border="0" align="absmiddle" /></a>&nbsp;|--%>&nbsp;登陆用户：<%=Model.CurrentUserName %>&nbsp;&nbsp;&nbsp;&nbsp;<%--|&nbsp;身份：管理员&nbsp;|&nbsp;
                                        界面风格：<a
                                            href="#"><img src="../../../../Content/Admin/zh-cn/main/images/index1_16.gif" width="48"
                                                height="24" border="0" align="absmiddle" /></a>&nbsp;--%>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    <div region="west" split="true" title="管理" style="width: 150px;">
        <% Html.RenderPartial("LeftMenuControl"); %>
    </div>
    <div region="south" border="false" style="height: 2px; background: #8DB2E3;">
    </div>
    <div id="main_tabs" region="center" class="easyui-tabs" tools="#tab-tools" title=""
        style="width: 800px; height: 700px">
    </div>
</body>
</html>
